import React from 'react';
import { connect } from 'dva';
import { Link, routerRedux } from 'dva/router';
import { WingBlank, WhiteSpace, List, Button } from 'antd-mobile';
import { createForm } from 'rc-form';
import MemberInfo from 'components/MemberInfo';
import { ScaleReport } from 'components/scale';

const { Item } = List;
const NativeScaleReportPage = ({ dispatch, location, ...rest }) => {
  const submit = () =>
    dispatch(
      routerRedux.push({
        pathname: '/native/scale_programe',
        state: {
          title: '3/3',
          ...location.state,
        },
      }),
    );
  return (
    <div>
      <MemberInfo {...location.state.member} />
      <WhiteSpace />
      <WingBlank size="md">
        
      </WingBlank>
      <WhiteSpace />
      <ScaleReport {...rest.report}>
        <WingBlank>
          <WhiteSpace size="xl" />
          <Button type="primary" onClick={submit}>下一步</Button>
        </WingBlank>
        <WhiteSpace size="xl" />
      </ScaleReport>
      <WhiteSpace size="xl" />
    </div>
  );
};

export default connect(({ scale }) => ({ ...scale }))(createForm()(NativeScaleReportPage));
